This repository was archived by the owner on Oct 13, 2023. It is now read-only.
[19.03 backport] Windows: Use system specific parallelism value on containers restart#423
Merged
thaJeztah merged 1 commit intoJan 16, 2020
Conversation
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com> (cherry picked from commit 447a840) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Member
Author
|
@kolyshkin @andrewhsu @ddebroy PTAL |
tianon
approved these changes
Nov 26, 2019
tianon
left a comment
There was a problem hiding this comment.
Faithful backport, LGTM 👍
$ diff -u <(wget -qO- 'https://github.com/moby/moby/pull/39733.diff') <(wget -qO- 'https://github.com/docker/engine/pull/423.diff')
--- /dev/fd/63 2019-11-26 14:15:58.943354427 -0800
+++ /dev/fd/62 2019-11-26 14:15:58.943354427 -0800
@@ -1,5 +1,5 @@
diff --git a/daemon/daemon_windows.go b/daemon/daemon_windows.go
-index f7d557fb8495..85a1d43ed596 100644
+index f6d0f8c6ced7..495f7788cb11 100644
--- a/daemon/daemon_windows.go
+++ b/daemon/daemon_windows.go
@@ -3,7 +3,9 @@ package daemon // import "github.com/docker/docker/daemon"
@@ -12,7 +12,7 @@
"strings"
"github.com/Microsoft/hcsshim"
-@@ -41,9 +43,10 @@ const (
+@@ -40,9 +42,10 @@ const (
windowsMaxCPUPercent = 100
)
$
olljanat
added a commit
to olljanat/moby
that referenced
this pull request
Nov 27, 2019
tonistiigi
approved these changes
Jan 16, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport of moby#39733
- What I did
moby#38301 did set container restart/restore task parallelism limit to 128*NumCPU which is good limit for Linux containers. Especially when they are made correctly by following one process per container rule.
However Windows containers are much heavier and example Windows Server 2019 base image
mcr.microsoft.com/windows/servercore:ltsc2019it selves includes ~20 system processes which causes restoring to generate so high load to server and it cannot response anything else until restore is completed.- How I did it
Disabled restore parallelism from Windows platform.
- How to verify it
I created 100 containers with restart policy:
On my 4 CPU test machine it they take about 8 minutes to restart with and without this changes.
However there is big difference how server is able to response to other commands.
Without this change CPU load is constantly 100% and even typing text to notepad takes long time:

After this change server still uses all CPU it have now it still responses to user input.

- A picture of a cute animal (not mandatory but encouraged)
